<?php

  function checkLoginStatus() {
    $return_string = "";
    if (isset($_SESSION['user_name'])) {
      $return_string .= "<loggedin>1</loggedin>\n"
          . "<username>" . $_SESSION['user_name'] . "</username>\n";
    } else {
      $return_string .= "<loggedin>0</loggedin>\n";
    }
    return $return_string;
  }

?>
